//
//  BaseModel.m
//  Cycling
//
//  Created by cjg.mini on 2023/3/2.
//

#import "BaseModel.h"

@implementation BaseModel
- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeInteger:_code forKey:@"code"];
    [aCoder encodeDouble:_time forKey:@"time"];
    [aCoder encodeObject:_msg forKey:@"msg"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    if ([self init]) {
        self.code = [aDecoder decodeIntegerForKey:@"code"];
        self.msg = [aDecoder decodeObjectForKey:@"msg"];
        self.time = [aDecoder decodeDoubleForKey:@"time"];
    }
    return self;
}


@end
